package cn.wolfcode.domain;

import cn.wolfcode.enums.NoticeEnums;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
public class Notice {
    /** */
    private Long id;
    /** */
    private String title;

    private String name;
    /** */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date creatTime;
    /** */
    private Integer leval;
    /** */
    private Boolean status;

    private boolean read;

    private String vals;
//未读的数量发布的时间
    private Long resMinute;

    public String getLevalName(){
       return NoticeEnums.findName(this.leval);
    }

    @Override
    public String toString(){
        return JSON.toJSONString(this);
    }
}